package cn.iocoder.yudao.module.product.favorite.vo;

import cn.iocoder.yudao.framework.business.interest.pojo.vo.AppInterestVO;
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
import cn.iocoder.yudao.module.product.spu.vo.AppProductSpuSimpleRespVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * <pre>
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 *  这里是文件说明
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * </pre>
 *
 * @author 山野羡民（1032694760@qq.com）
 * @since 2025/01/11
 */
@Data
public class AppProductFavoriteVO extends AppInterestVO {

    @Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long spuId;

    @Schema(description = "产品信息", requiredMode = Schema.RequiredMode.REQUIRED)
    private AppProductSpuSimpleRespVO spu;

    public AppProductSpuSimpleRespVO getSpu() {
        return JsonUtils.parseObject(getSnapshot(), AppProductSpuSimpleRespVO.class);
    }

}
